class ImpostoSindicalsController < ApplicationController
  # GET /imposto_sindicals
  # GET /imposto_sindicals.xml
  def index
    @imposto_sindicals = ImpostoSindical.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @imposto_sindicals }
    end
  end

  # GET /imposto_sindicals/1
  # GET /imposto_sindicals/1.xml
  def show
    @imposto_sindical = ImpostoSindical.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @imposto_sindical }
    end
  end

  # GET /imposto_sindicals/new
  # GET /imposto_sindicals/new.xml
  def new
    @imposto_sindical = ImpostoSindical.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @imposto_sindical }
    end
  end

  # GET /imposto_sindicals/1/edit
  def edit
    @imposto_sindical = ImpostoSindical.find(params[:id])
  end

  # POST /imposto_sindicals
  # POST /imposto_sindicals.xml
  def create
    @imposto_sindical = ImpostoSindical.new(params[:imposto_sindical])

    respond_to do |format|
      if @imposto_sindical.save
        flash[:notice] = 'ImpostoSindical was successfully created.'
        format.html { redirect_to(@imposto_sindical) }
        format.xml  { render :xml => @imposto_sindical, :status => :created, :location => @imposto_sindical }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @imposto_sindical.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /imposto_sindicals/1
  # PUT /imposto_sindicals/1.xml
  def update
    @imposto_sindical = ImpostoSindical.find(params[:id])

    respond_to do |format|
      if @imposto_sindical.update_attributes(params[:imposto_sindical])
        flash[:notice] = 'ImpostoSindical was successfully updated.'
        format.html { redirect_to(@imposto_sindical) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @imposto_sindical.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /imposto_sindicals/1
  # DELETE /imposto_sindicals/1.xml
  def destroy
    @imposto_sindical = ImpostoSindical.find(params[:id])
    @imposto_sindical.destroy

    respond_to do |format|
      format.html { redirect_to(imposto_sindicals_url) }
      format.xml  { head :ok }
    end
  end
end
